﻿using BookManage.BLL;
using BookManage.Model;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace BookManage
{
    public partial class frmFindPwd : Form
    {
        public frmFindPwd()
        {
            InitializeComponent();
        }

        private void btnBack_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btnFindPwd_Click_1(object sender, EventArgs e)
        {
            if (txtrdID.Text == "" || txtrdName.Text == "" || txtrdPhone.Text == "" || txtrdEmail.Text == "")
                MessageBox.Show("请将基本信息填写完整！！！");
            else
            {
                int rdID = Convert.ToInt32(txtrdID.Text);
                Reader reader=ReaderAdmin.GetReader(rdID);
                if (reader.rdName == txtrdName.Text && reader.rdPhone == txtrdPhone.Text && reader.rdEmail == txtrdEmail.Text)
                    ReaderAdmin.GetReader(rdID);
                MessageBox.Show("您的密码为:" + reader.rdPwd);
            }
        }
    }
}
